package com.hyc.gchatsystem.controller;

import com.hyc.gchatsystem.util.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @projectName: gchatsystem
 * @package: com.hyc.gchatsystem.controller
 * @className: redisController
 * @author: 冷环渊 doomwatcher
 * @description: TODO
 * @date: 2022/4/15 21:31
 * @version: 1.0
 */
@RestController
public class redisController {
    @Autowired
    private RedisUtil redisUtil;
    
    @GetMapping(value = "/setkey")
    public String setToredis(@RequestParam String key, @RequestParam Object value) {
        redisUtil.set(key, value);
        return "增加key" + key;
    }
}
